<div class="module-trade">
	<ol class="breadcrumb fn-clearfix">
		<li>交易管理</li>
		<li>用户算力获得奖励查询</li>
	</ol>
	<div class="panel panel-warning">
		<div class="panel-body">
			<form class="form-inline ui-form" role="form">
				<div class="form-group ui-input-select">
					<label for="record-uid" class="control-label f-12">用户搜索：</label>
					<input type="text" class="form-control " placeholder="UID" ng-model="userSearch" id="record-uid">
				</div>
				<div class="form-group ui-input-select">
					<button type="button" class="btn btn-primary" ng-click="vm.fetchList()">搜索</button>
				</div>

			</form>
		</div>
	</div>

	<div class="ui-box">
		<table class="table table-striped table-bordered table-hover asset-table" style="font-size: 14px;">
			<thead>
				<tr>
					<th>UID</th>
					<th>获得时间</th>
					<th>获得的币种</th>
					<th>获得奖励个数</th>
					<th>获得途径</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in vm.list" ng-if="vm.isLoading === false && vm.list.length > 0">
					<td>{{item.uid}}</td>
					<td>{{$root.moment(item.createTime - 0).utc().utcOffset($root.ZONE).format('YYYY-MM-DD HH:mm:ss')}}</td>
					<td>{{item.assetCode}}</td>
					<td>{{item.amount}}</td>
					<td ng-class="{
						greentradedetail:(item.assetChange=='BONUS_REWARD'),
						redtradedetail:(item.assetChange=='COIN_TYPE_REDUCE'),
						graytradedetail:(item.assetChange=='COIN_TYPE_ADD')}">{{item.assetChange == 'BONUS_REWARD' ? '奖励分红' : item.assetChange == 'COIN_TYPE_REDUCE' ? '系统自动发放（公司账户资产减少）' : '系统自动发放（用户奖励增加）'}}</td>
				</tr>
				<tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.list.length === 0||vm.list===null)">
					<td colspan="5">暂无数据</td>
				</tr>
				<tr class="ui-loading" ng-if="vm.isLoading === true">
					<td colspan="5">正在加载，请稍候...</td>
				</tr>
			</tbody>
		</table>

		<div class="ui-pager-box" ng-if="vm.totalNum > 0">
			<ul uib-pagination previous-text="上一页" next-text="下一页" first-text="首页" last-text="尾页" total-items="vm.totalNum" ng-model="vm.condition.pageNo"
			  max-size="5" items-per-page="vm.pageSize || 10" align="right" class="pagination" boundary-links="true" ng-change="vm.pageChanged()"
			  rotate="false"></ul>
		</div>
	</div>
</div>